/**
 * yiqihao(一起好商务股份有限公司) copyright 
 */
package com.p2p.front.dal.dao;

import org.apache.ibatis.annotations.Select;

import com.p2p.base.dao.BaseMapper;
import com.p2p.front.dal.model.IpInfo;

/**
 *
 * @author leiruiqi@yiqihao.com
 *
 * 2015年2月12日 上午8:50:54
 */
public interface IpInfoDao extends BaseMapper{

/*private String ipbegin;
	
	private String ipend;
	
	private String zone;
	
	private String company;
	
	private Long ipbeginInt;
	
	private Long ipendInt;
	
	private String province;*/
	
	@Select("select ipbegin,ipbegin,zone,company,ipbeginInt,ipendInt from p2p_ip_info where ipbeginInt < #{ipInt} and ipendInt > #{ipInt} ")
	IpInfo getByIpInt(Long ipInt);
	
	@Select("select ipbegin,ipbegin,zone,company,ipbeginInt,ipendInt from p2p_ip_info where  INET_ATON(#{ipStr}) between ipbeginInt and ipendInt")
	IpInfo getByIpStr(String ipStr);
	
}
